package com.jk.entity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.alibaba.fastjson.JSON;
import com.jk.entity.User;

/**
 * @author 周慧茹
 * 创建时间 2018/4/11  22:33
 * 邮箱 960297232@qq.com
 */
public class Test {

    public static void main(String[] args) {

        User shop = new User();

        shop.setUsername("zhangsan");
        shop.setUserpass("3");

        User shop1 = new User();

        shop1.setUsername("lisi");

        shop1.setUserpass("1");

        ArrayList<User> users = new ArrayList<>();

        users.add(shop);
        users.add(shop1);



        User shop2 = new User();

        shop2.setUsername("zhangsan");
        shop2.setUserpass("3");

        User shop3 = new User();

        shop3.setUsername("lisi");

        shop3.setUserpass("1");

        ArrayList<User> users1 = new ArrayList<>();

        users1.add(shop2);
        users1.add(shop3);

        HashMap<String, List<User>> map = new HashMap<>();

        map.put("123",users);

        map.put("456",users1);


        System.out.println(JSON.toJSONString(map));
    }
}
